package com.cs.noTender.controller;

import com.cs.noTender.service.CsProcurementPlanService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 采购计划表(cs_procurement_plan)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/plan")
public class CsProcurementPlanController extends BaseController {
    private final CsProcurementPlanService csProcurementPlanService;

    public CsProcurementPlanController(CsProcurementPlanService csProcurementPlanService) {
        this.csProcurementPlanService = csProcurementPlanService;
    }

    /**
     * 获取采购计划详细信息
     */
    @GetMapping(value = "/{aid}")
    public AjaxResult getInfo(@PathVariable("aid") Integer aid) {
        return success(csProcurementPlanService.getCsProcurementPlanByAid(aid));
    }
}
